package com.xuetao.spider.engine;

import com.xuetao.spider.task.BaseTask;
import com.xuetao.spider.task.PostTask;
import com.xuetao.spider.task.UserProfileTask;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description
 * @Author xuetao wang
 * @Date 2021/3/31
 */
public class SpiderEngine {

    private static final List<BaseTask> baseTaskList = new ArrayList();

    static {
        baseTaskList.add(new UserProfileTask());
        baseTaskList.add(new PostTask());
    }

    public void start() {
        baseTaskList.forEach(task -> task.doTask());
    }
}
